﻿using UnityEngine;
using System.Collections;

public class Avancement : MonoBehaviour {

	public float speed;
	public GameObject lave;
	public bool fin;


	void Start()

	{
		fin = false;
	
	}

	void Update () {

		if ((lave.transform.position.x >= 16) || (fin == true)) transform.position += new Vector3 (0, 0, 0);
		else transform.position += new Vector3 (speed * Time.deltaTime, 0, 0);
	}
}
